@zonos/elements 1.3.172 → 1.3.174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{CheckoutConfig-c5943bbf.js → CheckoutConfig-fb59baa3.js} +1 -1
- package/dist/cjs/{cart-d91d9507.js → cart-93ed3002.js} +9 -1
- package/dist/cjs/{handleFetch-ff25db40.js → handleFetch-969d05d8.js} +36 -13
- package/dist/cjs/index.cjs.js +9 -9
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-82841277.js → paypal-8b49ef07.js} +6 -2
- package/dist/cjs/zonos-address_7.cjs.entry.js +14 -6
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +17 -14
- package/dist/cjs/zonos-checkout.cjs.entry.js +15 -13
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +20 -4
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +10 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
- package/dist/collection/components/store/checkout/paypal.js +5 -0
- package/dist/collection/components/store/checkout/stripe.js +7 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +12 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +22 -2
- package/dist/collection/components/utils/api/trackConversionEvent.js +1 -0
- package/dist/collection/components/utils/logging/getAdditionalLogMetadata.js +1 -1
- package/dist/collection/components/utils/logging/prepLoadTimeApiLog.js +30 -12
- package/dist/collection/components/utils/logging/sendBulkLoadTimeApiLog.js +6 -3
- package/dist/collection/types/generated/graphql.frontend.types.js +3 -0
- package/dist/collection/types/generated/graphql.internal.types.js +4 -0
- package/dist/esm/{CheckoutConfig-75af3742.js → CheckoutConfig-63b3ed06.js} +1 -1
- package/dist/esm/{cart-52e208cc.js → cart-54d84646.js} +9 -1
- package/dist/esm/{handleFetch-0109fb78.js → handleFetch-621e45bc.js} +36 -14
- package/dist/esm/index.js +10 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-2e1c560e.js → paypal-17a320c8.js} +6 -2
- package/dist/esm/zonos-address_7.entry.js +13 -5
- package/dist/esm/zonos-cart-items_13.entry.js +13 -10
- package/dist/esm/zonos-checkout.entry.js +12 -10
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +2 -2
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +20 -4
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm-es5/{CheckoutConfig-75af3742.js → CheckoutConfig-63b3ed06.js} +1 -1
- package/dist/esm-es5/{cart-52e208cc.js → cart-54d84646.js} +1 -1
- package/dist/esm-es5/handleFetch-621e45bc.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-2e1c560e.js → paypal-17a320c8.js} +2 -2
- package/dist/esm-es5/zonos-address_7.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +21 -12
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +4 -0
- package/dist/types/components/stripe/zonos-payment/zonos-payment.d.ts +3 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/logging/getAdditionalLogMetadata.d.ts +4 -1
- package/dist/types/components/utils/logging/prepLoadTimeApiLog.d.ts +2 -4
- package/dist/types/types/ConversionEvent.d.ts +2 -1
- package/dist/types/types/LogLoadScript.d.ts +22 -1
- package/dist/types/types/generated/graphql.frontend.types.d.ts +13 -2
- package/dist/types/types/generated/graphql.frontend.types.ts +23 -2
- package/dist/types/types/generated/graphql.internal.types.d.ts +4 -0
- package/dist/types/types/generated/graphql.internal.types.ts +4 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-1e3e4e22.entry.js → p-0ee9b22a.entry.js} +1 -1
- package/dist/zonos-elements/p-0fc02cde.js +1 -0
- package/dist/zonos-elements/{p-aa754137.system.entry.js → p-19ac0f84.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb716dcc.system.entry.js → p-1b6d0895.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1b75aa35.system.js +1 -0
- package/dist/zonos-elements/p-28dcd7bb.entry.js +1 -0
- package/dist/zonos-elements/{p-aea22783.system.entry.js → p-3d169241.system.entry.js} +1 -1
- package/dist/zonos-elements/p-416ac901.entry.js +1 -0
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
- package/dist/zonos-elements/{p-a61ef92f.entry.js → p-4a87a92c.entry.js} +1 -1
- package/dist/zonos-elements/{p-10a9edf6.entry.js → p-4c6dfe2e.entry.js} +1 -1
- package/dist/zonos-elements/p-6612e6f9.system.entry.js +1 -0
- package/dist/zonos-elements/{p-2d2c70a3.js → p-75b771cf.js} +1 -1
- package/dist/zonos-elements/{p-14bd4766.entry.js → p-78a95cee.entry.js} +1 -1
- package/dist/zonos-elements/{p-36c35a07.system.js → p-84dd312c.system.js} +1 -1
- package/dist/zonos-elements/{p-1c488ecf.js → p-869bbedc.js} +1 -1
- package/dist/zonos-elements/p-8964d8f8.system.js +17 -0
- package/dist/zonos-elements/p-8e436df2.system.entry.js +1 -0
- package/dist/zonos-elements/{p-91a7ca64.system.entry.js → p-9f8b820e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7de48475.system.js → p-a1d54022.system.js} +1 -1
- package/dist/zonos-elements/p-b86b82eb.entry.js +1 -0
- package/dist/zonos-elements/p-c67f6666.system.entry.js +1 -0
- package/dist/zonos-elements/p-d22c15be.entry.js +1 -0
- package/dist/zonos-elements/p-d74ab632.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c719434a.entry.js → p-d9779ea7.entry.js} +1 -1
- package/dist/zonos-elements/{p-048e4b38.system.entry.js → p-d98fa14c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2ebb4fa7.system.js → p-e0d3aeae.system.js} +1 -1
- package/dist/zonos-elements/{p-9a10a63b.system.entry.js → p-e11eecbf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-68304407.entry.js → p-ed8a8a44.entry.js} +1 -1
- package/dist/zonos-elements/p-f80f24a0.js +17 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/isCheckoutMobile-f491ca7c.js +0 -8
- package/dist/esm/isCheckoutMobile-8846dccb.js +0 -6
- package/dist/esm-es5/handleFetch-0109fb78.js +0 -1
- package/dist/esm-es5/isCheckoutMobile-8846dccb.js +0 -1
- package/dist/zonos-elements/p-04c38987.system.js +0 -1
- package/dist/zonos-elements/p-0ee42be2.system.js +0 -17
- package/dist/zonos-elements/p-221d4f15.system.entry.js +0 -1
- package/dist/zonos-elements/p-246c3b28.entry.js +0 -1
- package/dist/zonos-elements/p-2b8c5669.system.entry.js +0 -1
- package/dist/zonos-elements/p-588ac238.entry.js +0 -1
- package/dist/zonos-elements/p-81a54668.js +0 -1
- package/dist/zonos-elements/p-839448c3.js +0 -1
- package/dist/zonos-elements/p-85d2da79.system.entry.js +0 -1
- package/dist/zonos-elements/p-a08fad84.entry.js +0 -1
- package/dist/zonos-elements/p-aed0098c.system.js +0 -1
- package/dist/zonos-elements/p-ba604bc4.entry.js +0 -1
- package/dist/zonos-elements/p-bbf9dbe4.js +0 -17
- package/dist/zonos-elements/p-e34c0f83.system.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
4
|
-
const handleFetch = require('./handleFetch-
|
|
4
|
+
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
5
5
|
const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
|
|
6
6
|
const getBorderRadius = require('./getBorderRadius-94ef609c.js');
|
|
7
7
|
|
|
@@ -10709,6 +10709,7 @@ const trackConversionEvent = async (eventName, metadata) => {
|
|
|
10709
10709
|
const body = {
|
|
10710
10710
|
checkoutSessionId,
|
|
10711
10711
|
countryCode,
|
|
10712
|
+
eventCreated: Date.now(),
|
|
10712
10713
|
eventName,
|
|
10713
10714
|
metadata,
|
|
10714
10715
|
organizationId,
|
|
@@ -11148,6 +11149,10 @@ const stripeCalculateLandedCost = async () => {
|
|
|
11148
11149
|
}
|
|
11149
11150
|
return Object.assign(Object.assign({}, checkoutSession), { landedCost: foundLandedCost });
|
|
11150
11151
|
}).filter(Boolean)) || [];
|
|
11152
|
+
// Send event when we get the quote back after the customer clicked "Continue to shipping"
|
|
11153
|
+
if (checkoutSessionWorkflow === null || checkoutSessionWorkflow === void 0 ? void 0 : checkoutSessionWorkflow.length) {
|
|
11154
|
+
void trackConversionEvent('checkout_quoteReceived');
|
|
11155
|
+
}
|
|
11151
11156
|
// update adjustmentTotal
|
|
11152
11157
|
// highlight promocode input error if promocode is applied but no adjustment applied in landed cost
|
|
11153
11158
|
const isInvalidPromoCode = cartStore.promoCodeApplied &&
|
|
@@ -11448,6 +11453,9 @@ const stripeStoreConfirmPayment = async () => {
|
|
|
11448
11453
|
paymentMethod: paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.payment_method,
|
|
11449
11454
|
});
|
|
11450
11455
|
handleFetch.log('Payment intent confirmed', 'info', { error, paymentIntent });
|
|
11456
|
+
if ((paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.status) === 'requires_action') {
|
|
11457
|
+
throw new Error(translate('Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.'));
|
|
11458
|
+
}
|
|
11451
11459
|
if (error) {
|
|
11452
11460
|
if (error.type === 'card_error' || error.type === 'validation_error') {
|
|
11453
11461
|
throw new Error(error.message);
|
|
@@ -126,6 +126,11 @@ const jsonParse = (_data) => {
|
|
|
126
126
|
return null;
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
+
const checkoutBreakpoint = 890;
|
|
130
|
+
const isCheckoutMobile = (isMobile) => {
|
|
131
|
+
return isMobile || window.innerWidth < checkoutBreakpoint;
|
|
132
|
+
};
|
|
133
|
+
|
|
129
134
|
const getNavigatorConnection = () => {
|
|
130
135
|
const connection = 'connection' in window.navigator
|
|
131
136
|
? // connection is not yet supported in all browsers
|
|
@@ -156,7 +161,7 @@ const getAdditionalLogMetadata = () => {
|
|
|
156
161
|
connectionSaveData: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.saveData,
|
|
157
162
|
isHostedCheckout: window.Zonos.isLegacyCheckout,
|
|
158
163
|
screenHeight: window.screen.height,
|
|
159
|
-
screenWidth: window.
|
|
164
|
+
screenWidth: window.innerWidth,
|
|
160
165
|
userAgent: userAgentData && userAgentData.brands.length > 0
|
|
161
166
|
? userAgentData
|
|
162
167
|
: window.navigator.userAgent,
|
|
@@ -165,7 +170,7 @@ const getAdditionalLogMetadata = () => {
|
|
|
165
170
|
|
|
166
171
|
const blackListPaths = [
|
|
167
172
|
'/api/zonos-elements/log-script-load',
|
|
168
|
-
'/api/zonos-elements/log-bulk-load',
|
|
173
|
+
'/api/zonos-elements/log-bulk-load-data',
|
|
169
174
|
];
|
|
170
175
|
/**
|
|
171
176
|
* Prepares the load time api log for the given API call to send to the server later
|
|
@@ -176,20 +181,37 @@ const prepLoadTimeApiLog = ({ apiPath, apiType, loadTimeInternal, loadTimeTotal,
|
|
|
176
181
|
if (blackListPaths.includes(apiPath)) {
|
|
177
182
|
return;
|
|
178
183
|
}
|
|
184
|
+
const loadTimeBrowserApi = loadTimeTotal - loadTimeInternal;
|
|
185
|
+
// No need to record if the browser API load time is negative (cached)
|
|
186
|
+
if (loadTimeBrowserApi < 0) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
// e.g. /api/zonos-elements/log-script-load?zonosDebug=1 -> /api/zonos-elements/log-script-load
|
|
179
190
|
const apiPathWithoutParams = apiPath.split('?')[0] || apiPath;
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
191
|
+
const additionalLogMetadata = getAdditionalLogMetadata();
|
|
192
|
+
const isMobileAgent = typeof additionalLogMetadata.userAgent === 'object' &&
|
|
193
|
+
additionalLogMetadata.userAgent.mobile;
|
|
194
|
+
const bulkLoadLogBody = {
|
|
195
|
+
apiType,
|
|
196
|
+
connectionType: additionalLogMetadata.connectionEffectiveType,
|
|
185
197
|
href: apiPathWithoutParams,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
198
|
+
isHostedCheckout: window.Zonos.isLegacyCheckout,
|
|
199
|
+
// Use the isMobileAgent to determine if the checkout is mobile, if it's not availabe, use the logic from isCheckoutMobile
|
|
200
|
+
isMobile: isCheckoutMobile(isMobileAgent),
|
|
201
|
+
loadTimeBrowserApi,
|
|
202
|
+
loadTimeInternal,
|
|
203
|
+
loadTimeTotal,
|
|
204
|
+
metadata: Object.assign({}, additionalLogMetadata),
|
|
205
|
+
screenHeight: additionalLogMetadata.screenHeight,
|
|
206
|
+
screenWidth: additionalLogMetadata.screenWidth,
|
|
207
|
+
userAgent: typeof additionalLogMetadata.userAgent === 'string'
|
|
208
|
+
? additionalLogMetadata.userAgent
|
|
209
|
+
: additionalLogMetadata.userAgent['brands']
|
|
210
|
+
.map(brand => brand.brand)
|
|
211
|
+
.filter(brand => !/Not.*A.*Brand.*/.test(brand))
|
|
212
|
+
.join(','),
|
|
191
213
|
};
|
|
192
|
-
window.Zonos.loadTimeApiInfoList.push(
|
|
214
|
+
window.Zonos.loadTimeApiInfoList.push(bulkLoadLogBody);
|
|
193
215
|
};
|
|
194
216
|
|
|
195
217
|
/**
|
|
@@ -475,6 +497,7 @@ exports.getElapsedTime = getElapsedTime;
|
|
|
475
497
|
exports.getIsStagingMode = getIsStagingMode;
|
|
476
498
|
exports.getIsTestMode = getIsTestMode;
|
|
477
499
|
exports.handleFetch = handleFetch;
|
|
500
|
+
exports.isCheckoutMobile = isCheckoutMobile;
|
|
478
501
|
exports.jsonParse = jsonParse;
|
|
479
502
|
exports.log = log;
|
|
480
503
|
exports.logError = logError;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
6
|
-
const CheckoutConfig = require('./CheckoutConfig-
|
|
5
|
+
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
6
|
+
const CheckoutConfig = require('./CheckoutConfig-fb59baa3.js');
|
|
7
7
|
const TaxId = require('./TaxId-4632639d.js');
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -129,7 +129,7 @@ const getZonosQaUrl = () => {
|
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
131
131
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
132
|
-
const cdnUrl = "https://v1.3.
|
|
132
|
+
const cdnUrl = "https://v1.3.174.js.zonos.com";
|
|
133
133
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
134
134
|
if (!qaUrl &&
|
|
135
135
|
(cdnUrl.includes('test.') ||
|
|
@@ -313,10 +313,10 @@ const zonosLoadUrl = (() => {
|
|
|
313
313
|
}
|
|
314
314
|
return null;
|
|
315
315
|
})();
|
|
316
|
-
const ZONOS_URL = "https://v1.3.
|
|
317
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
318
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
319
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
316
|
+
const ZONOS_URL = "https://v1.3.174.js.zonos.com";
|
|
317
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.174";
|
|
318
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.174";
|
|
319
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.174";
|
|
320
320
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
321
321
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
322
322
|
class Zonos {
|
|
@@ -330,7 +330,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
330
330
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
331
331
|
Zonos._paypalMockResponse = null;
|
|
332
332
|
Zonos.isBigCommerce = false;
|
|
333
|
-
Zonos.releaseDate = "
|
|
333
|
+
Zonos.releaseDate = "1742827810410";
|
|
334
334
|
Zonos.isLegacyCheckout = false;
|
|
335
335
|
Zonos.domain = typeof window !== 'undefined'
|
|
336
336
|
? // domain that embeds the iframe
|
|
@@ -346,7 +346,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
346
346
|
Zonos.isNpm = true;
|
|
347
347
|
Zonos.zonosQaUrl = null;
|
|
348
348
|
Zonos.zonosQaUrlApi = null;
|
|
349
|
-
Zonos.version = `v${"1.3.
|
|
349
|
+
Zonos.version = `v${"1.3.174"}`;
|
|
350
350
|
Zonos.modeAlerted = false;
|
|
351
351
|
Zonos.cartData = null;
|
|
352
352
|
Zonos.paypal = null;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy(JSON.parse("[[\"zonos-checkout.cjs\",[[2,\"zonos-checkout\",{\"appearanceSettingsOverride\":[16],\"preview\":[4],\"mobile\":[4],\"overrideStagingMode\":[4,\"override-staging-mode\"],\"defaultAddress\":[16],\"forceDialogOpen\":[4,\"force-dialog-open\"],\"defaultAddressParams\":[32],\"defaultCustomerProfileAddress\":[32],\"customerProfile\":[32],\"open\":[32],\"stripe\":[32],\"submitLoading\":[32],\"collapseReviewMobile\":[32],\"isAttachError\":[32],\"isMobile\":[32],\"isIframed\":[32],\"zonosReviewRef\":[32],\"storybookPaymentStatusOverride\":[32],\"isLegacyCheckout\":[32],\"confirmDialogOpen\":[32],\"isCartExpired\":[32],\"payInUsdConfirmDialogOpen\":[32],\"inventoryCheckErrorMessage\":[32],\"placedOrderInfo\":[32],\"clientSecret\":[32],\"stripeCustomerSessionClientSecret\":[32],\"closeDialogHandler\":[64],\"init\":[64],\"setToFinishStep\":[64],\"mockCheckoutSession\":[64]},[[16,\"zonos--init-cart-info\",\"initCartInfoHandler\"],[4,\"keydown\",\"handleKeyPress\"],[9,\"resize\",\"handleWindowResize\"]],{\"appearanceSettingsOverride\":[\"appearanceSettingsOverrideChanged\",\"handleAppearanceSettingsOverrideChange\"],\"overrideStagingMode\":[\"overrideStagingModeChanged\"],\"mobile\":[\"handleMobileChange\"],\"defaultAddress\":[\"handleAddressChange\"],\"customerProfile\":[\"handleCustomerProfileChange\"],\"clientSecret\":[\"handleClientSecretChange\"],\"stripeCustomerSessionClientSecret\":[\"handleClientSecretChange\"],\"open\":[\"handleOpenChange\"]}]]],[\"zonos-hello.cjs\",[[1,\"zonos-hello\",{\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettingsOverride\":[16],\"showPeekMessage\":[32],\"zonosStoreHelloSettings\":[32],\"showDialog\":[32],\"peekMessage\":[32],\"initialUrl\":[32],\"allRestrictedItems\":[32],\"allFoundProducts\":[32],\"productsOnPage\":[32],\"isHelloWidgetRendered\":[32],\"isMobile\":[32],\"getCountryList\":[64],\"displayCurrency\":[64],\"convertAndFormat\":[64],\"convert\":[64],\"format\":[64],\"openHelloDialog\":[64]},[[9,\"resize\",\"handleResize\"]],{\"appearanceSettingsOverride\":[\"handleAppearanceSettingsOverrideChange\"]}]]],[\"zonos-controller.cjs\",[[1,\"zonos-controller\",{\"config\":[16],\"zonosApiKey\":[1,\"zonos-api-key\"],\"initCheckoutElement\":[64],\"setupGoogleFont\":[64],\"showNotification\":[64],\"reset\":[64],\"overrideConfig\":[64],\"overrideCountry\":[64],\"getAppearanceSetting\":[64],\"updateOrganizationName\":[64]},[[8,\"locationchange\",\"handleLocationChange\"]]]]],[\"zonos-tooltip.cjs\",[[1,\"zonos-tooltip\",{\"label\":[1],\"subtitle\":[1],\"showTooltip\":[32]}]]],[\"zonos-component.cjs\",[[1,\"zonos-component\",{\"first\":[1],\"middle\":[1],\"last\":[1]}]]],[\"zonos-link.cjs\",[[1,\"zonos-link\",{\"href\":[1],\"rel\":[1],\"target\":[1],\"linkTitle\":[1,\"link-title\"]}]]],[\"zonos-logo.cjs\",[[1,\"zonos-logo\",{\"theme\":[1],\"width\":[1]}]]],[\"zonos-hello-dialog.cjs\",[[1,\"zonos-hello-dialog\",{\"isOpen\":[4,\"is-open\"],\"setIsOpen\":[16],\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettings\":[16],\"restrictedItems\":[16],\"welcomeMessage\":[32],\"showCountrySelect\":[32],\"showLanguageSelect\":[32]},[[4,\"click\",\"globalClickHandler\"]],{\"isOpen\":[\"isOpenHandler\"]}]]],[\"zonos-badge.cjs\",[[1,\"zonos-badge\",{\"bold\":[4],\"badgeColor\":[1,\"badge-color\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"rounded\":[4],\"loading\":[4],\"dismissHandler\":[16]}]]],[\"zonos-shipping-rich-radio.cjs\",[[1,\"zonos-shipping-rich-radio\",{\"items\":[16],\"borderColor\":[1,\"border-color\"],\"borderStyle\":[1,\"border-style\"],\"theme\":[1],\"selectedItem\":[16]}]]],[\"zonos-toggle.cjs\",[[1,\"zonos-toggle\",{\"options\":[16],\"value\":[1]}]]],[\"zonos-collapse.cjs\",[[1,\"zonos-collapse\",{\"collapsed\":[4],\"collapseSize\":[2,\"collapse-size\"],\"height\":[32],\"iframe\":[32]}]]],[\"zonos-stripe-input.cjs\",[[1,\"zonos-stripe-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"overridePrimaryColor\":[1,\"override-primary-color\"],\"overrideSecondaryColor\":[1,\"override-secondary-color\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[1025],\"internalValue\":[32]},null,{\"inputValue\":[\"onInputValueChange\"],\"value\":[\"onValueChange\"]}]]],[\"zonos-card.cjs\",[[1,\"zonos-card\",{\"actions\":[16],\"backgroundColor\":[1,\"background-color\"],\"borderRadius\":[2,\"border-radius\"],\"footerActions\":[16],\"footerContent\":[16],\"footerHeight\":[2,\"footer-height\"],\"label\":[16],\"spacing\":[1]}]]],[\"zonos-input.cjs\",[[1,\"zonos-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"inputSize\":[1,\"input-size\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[32]},null,{\"inputValue\":[\"onInputValueChange\"]}]]],[\"zonos-text.cjs\",[[1,\"zonos-text\",{\"textColor\":[1,\"text-color\"],\"size\":[1],\"type\":[1],\"weight\":[2],\"ready\":[32]}]]],[\"zonos-banner.cjs\",[[1,\"zonos-banner\",{\"bannerTitle\":[1,\"banner-title\"],\"intent\":[1],\"hasContent\":[32]}]]],[\"zonos-country-flag.cjs\",[[1,\"zonos-country-flag\",{\"countryCode\":[1,\"country-code\"],\"size\":[2]}]]],[\"zonos-v-stack.cjs\",[[1,\"zonos-v-stack\",{\"spacing\":[2]}]]],[\"zonos-empty-state-payment_4.cjs\",[[1,\"zonos-empty-state-payment\",{\"emptyStateText\":[1,\"empty-state-text\"],\"theme\":[1]}],[2,\"zonos-payment\",{\"titleText\":[1,\"title-text\"],\"stripe\":[32],\"stripeElements\":[32]},null,{\"stripeElements\":[\"watchInitStripe\"],\"stripe\":[\"watchInitStripe\"]}],[2,\"zonos-paypal-payment\"],[1,\"zonos-notification\",{\"notificationArray\":[32],\"showNotification\":[64]}]]],[\"zonos-button_3.cjs\",[[17,\"zonos-button\",{\"buttonColor\":[1,\"button-color\"],\"backgroundColor\":[1,\"background-color\"],\"borderStyle\":[1,\"border-style\"],\"isDisabled\":[4,\"is-disabled\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"variant\":[1],\"noBackground\":[4,\"no-background\"],\"withBoxShadow\":[4,\"with-box-shadow\"],\"noPaddingLeft\":[4,\"no-padding-left\"],\"noPaddingRight\":[4,\"no-padding-right\"],\"loading\":[4],\"justifyContent\":[1,\"justify-content\"],\"bold\":[4],\"theme\":[1],\"hasIcon\":[32],\"hasContent\":[32]},[[2,\"click\",\"clickHandler\"]],{\"icon\":[\"iconChangeHandler\"]}],[1,\"zonos-spinner\",{\"size\":[2],\"spinnerColor\":[1,\"spinner-color\"]}],[1,\"zonos-icon\",{\"autoHeight\":[4,\"auto-height\"],\"iconColor\":[1,\"icon-color\"],\"content\":[1],\"size\":[2]}]]],[\"zonos-language-select_2.cjs\",[[1,\"zonos-language-select\",{\"handleOnClose\":[16]}],[1,\"zonos-select-dialog-header\",{\"handleOnClose\":[16],\"label\":[1]}]]],[\"zonos-country-select_4.cjs\",[[1,\"zonos-country-select\",{\"handleOnClose\":[16],\"inputValue\":[32]}],[1,\"zonos-hello-dialog-footer\",{\"appearanceSettings\":[16],\"setShowCountrySelect\":[16],\"setShowLanguageSelect\":[16]}],[1,\"zonos-custom-message\",{\"icon\":[1],\"message\":[1]}],[2,\"zonos-virtual-scroll\",{\"renderItem\":[16],\"itemWidth\":[2,\"item-width\"],\"fallbackItemHeight\":[2,\"fallback-item-height\"],\"itemHeights\":[16],\"container\":[32],\"scrollTop\":[32],\"totalHeight\":[32]},null,{\"itemHeights\":[\"updateTotalHeight\"],\"fallbackItemHeight\":[\"updateTotalHeight\"]}]]],[\"zonos-address_7.cjs\",[[1,\"zonos-address-update-dialog\",{\"continueLoading\":[4,\"continue-loading\"],\"dialogLoading\":[4,\"dialog-loading\"],\"dialogOpen\":[4,\"dialog-open\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"shippingAddress\":[16],\"billingAddress\":[16],\"translatedShippingAddress\":[16],\"translatedBillingAddress\":[16],\"showErrorBanner\":[32],\"translatedShippingAddressState\":[32],\"translatedBillingAddressState\":[32]},null,{\"translatedShippingAddress\":[\"watchTranslatedShippingAddress\"],\"translatedBillingAddress\":[\"watchTranslatedBillingAddress\"]}],[2,\"zonos-address\",{\"type\":[1],\"titleText\":[1,\"title-text\"],\"defaultAddress\":[16],\"stripe\":[32],\"isDirtyAddress\":[32]},null,{\"stripe\":[\"watchInitStripe\"],\"defaultAddress\":[\"defaultAddressChanged\"]}],[2,\"zonos-link-authentication\",{\"titleText\":[1,\"title-text\"],\"defaultEmail\":[1,\"default-email\"],\"isEmailError\":[4,\"is-email-error\"],\"stripe\":[32],\"isStagingMode\":[32],\"clientSecret\":[32]},null,{\"isStagingMode\":[\"watchIsStagingMode\"],\"stripe\":[\"watchInitStripe\"],\"clientSecret\":[\"watchInitStripe\"],\"defaultEmail\":[\"watchDefaultEmail\"]}],[1,\"zonos-checkbox\",{\"backgroundColor\":[1,\"background-color\"],\"label\":[1],\"isChecked\":[4,\"is-checked\"],\"isDisabled\":[4,\"is-disabled\"],\"size\":[2],\"fontSize\":[1,\"font-size\"],\"borderStyle\":[1,\"border-style\"]},[[1,\"click\",\"onClick\"]]],[1,\"zonos-dialog\",{\"open\":[4],\"headerText\":[1,\"header-text\"],\"width\":[1],\"height\":[1],\"minHeight\":[1,\"min-height\"],\"noHeader\":[4,\"no-header\"],\"noBodyPadding\":[4,\"no-body-padding\"],\"noBorder\":[4,\"no-border\"],\"borderStyle\":[1,\"border-style\"],\"noCloseButton\":[4,\"no-close-button\"],\"noClickOutside\":[4,\"no-click-outside\"],\"mobile\":[4],\"isLoading\":[4,\"is-loading\"],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"],[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-address-display\",{\"currentAddress\":[16],\"addressType\":[1,\"address-type\"]}],[1,\"zonos-address-form\",{\"currentAddress\":[16],\"translatedAddress\":[16],\"addressType\":[1,\"address-type\"],\"localAddress\":[32]},null,{\"translatedAddress\":[\"watchCurrentAddress\"]}]]],[\"zonos-cart-items_13.cjs\",[[2,\"zonos-customer-info\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"defaultAddress\":[16],\"showErrorBanner\":[32],\"shippingCountry\":[32],\"isCheckingForRestrictedItems\":[32],\"isValidatingAddress\":[32],\"isTaxIdError\":[32],\"invalidShippingCharacterList\":[32],\"invalidBillingCharacterList\":[32],\"openAddressValidationDialog\":[32],\"isEmailError\":[32]}],[2,\"zonos-checkout-payment\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"overridePrimaryColor\":[1,\"override-primary-color\"],\"showErrorBanner\":[32],\"hasStripePaymentError\":[32],\"stagingOrderCreateErrorMessage\":[32],\"internalContinueLoading\":[32]},null,{\"continueLoading\":[\"continueLoadingWatcher\"],\"hasStripePaymentError\":[\"stripePaymentErrorWatcher\"]}],[1,\"zonos-checkout-footer\",{\"mobile\":[4],\"dataTheme\":[1,\"data-theme\"],\"showLanguageDialog\":[32],\"isMobile\":[32]},[[4,\"click\",\"handleGlobalClick\"]],{\"mobile\":[\"handleMobileChange\"]}],[2,\"zonos-shipping\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"selectedShippingMethod\":[32],\"collapsedDAPOptions\":[32],\"isSelecting\":[32],\"showErrorBanner\":[32],\"serviceLevelsDDP\":[32],\"serviceLevelsDAP\":[32],\"serviceLevelsOther\":[32],\"serviceLevelsAll\":[32],\"displayBaseCurrency\":[32]}],[1,\"zonos-cart-subtotal\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"loading\":[32]}],[1,\"zonos-cart-restricted-items\",{\"hide\":[4],\"errorImages\":[32],\"internalCollapsed\":[32],\"firstRender\":[32]}],[1,\"zonos-checkout-finish\",{\"borderRadius\":[1,\"border-radius\"],\"storybookForceStatus\":[1,\"storybook-force-status\"],\"overrideNotification\":[16],\"isLoading\":[32],\"notificationType\":[32],\"notificationTitle\":[32],\"notificationMessages\":[32],\"notificationActionText\":[32],\"order\":[32],\"isWaitingToRedirect\":[32]}],[1,\"zonos-confirm-dialog\",{\"dialogTitle\":[1,\"dialog-title\"],\"dialogIntent\":[1,\"dialog-intent\"],\"dialogSubtitle\":[1,\"dialog-subtitle\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"dialogConfirmBtnText\":[1,\"dialog-confirm-btn-text\"],\"dialogWidth\":[2,\"dialog-width\"],\"dialogCancelBtnText\":[1,\"dialog-cancel-btn-text\"],\"dialogType\":[1,\"dialog-type\"],\"isMobile\":[4,\"is-mobile\"],\"dialogOpen\":[4,\"dialog-open\"],\"noClickOutside\":[4,\"no-click-outside\"]},[[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-checkout-progress-tabs\",{\"tabColor\":[1,\"tab-color\"],\"backgroundColor\":[1,\"background-color\"],\"setTabItems\":[64],\"setTabSelected\":[64]}],[1,\"zonos-review\",{\"mobile\":[4],\"collapsed\":[4],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"]]],[1,\"zonos-cart-items\",{\"errorImages\":[32]}],[1,\"zonos-currency-toggle\",{\"errorImages\":[32]}],[1,\"zonos-rest-state\",{\"restStateSubtitle\":[1,\"rest-state-subtitle\"],\"restStateTitle\":[1,\"rest-state-title\"],\"restStateType\":[1,\"rest-state-type\"],\"isErrorImageLoad\":[32]}]]]]"), options);
|
|
11
|
+
return index.bootstrapLazy(JSON.parse("[[\"zonos-checkout.cjs\",[[2,\"zonos-checkout\",{\"appearanceSettingsOverride\":[16],\"preview\":[4],\"mobile\":[4],\"overrideStagingMode\":[4,\"override-staging-mode\"],\"defaultAddress\":[16],\"forceDialogOpen\":[4,\"force-dialog-open\"],\"defaultAddressParams\":[32],\"defaultCustomerProfileAddress\":[32],\"customerProfile\":[32],\"open\":[32],\"stripe\":[32],\"submitLoading\":[32],\"collapseReviewMobile\":[32],\"isAttachError\":[32],\"isMobile\":[32],\"isIframed\":[32],\"zonosReviewRef\":[32],\"storybookPaymentStatusOverride\":[32],\"isLegacyCheckout\":[32],\"confirmDialogOpen\":[32],\"isCartExpired\":[32],\"payInUsdConfirmDialogOpen\":[32],\"inventoryCheckErrorMessage\":[32],\"placedOrderInfo\":[32],\"clientSecret\":[32],\"stripeCustomerSessionClientSecret\":[32],\"closeDialogHandler\":[64],\"init\":[64],\"setToFinishStep\":[64],\"mockCheckoutSession\":[64]},[[16,\"zonos--init-cart-info\",\"initCartInfoHandler\"],[4,\"keydown\",\"handleKeyPress\"],[9,\"resize\",\"handleWindowResize\"]],{\"appearanceSettingsOverride\":[\"appearanceSettingsOverrideChanged\",\"handleAppearanceSettingsOverrideChange\"],\"overrideStagingMode\":[\"overrideStagingModeChanged\"],\"mobile\":[\"handleMobileChange\"],\"defaultAddress\":[\"handleAddressChange\"],\"customerProfile\":[\"handleCustomerProfileChange\"],\"clientSecret\":[\"handleClientSecretChange\"],\"stripeCustomerSessionClientSecret\":[\"handleClientSecretChange\"],\"open\":[\"handleOpenChange\"]}]]],[\"zonos-hello.cjs\",[[1,\"zonos-hello\",{\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettingsOverride\":[16],\"showPeekMessage\":[32],\"zonosStoreHelloSettings\":[32],\"showDialog\":[32],\"peekMessage\":[32],\"initialUrl\":[32],\"allRestrictedItems\":[32],\"allFoundProducts\":[32],\"productsOnPage\":[32],\"isHelloWidgetRendered\":[32],\"isMobile\":[32],\"getCountryList\":[64],\"displayCurrency\":[64],\"convertAndFormat\":[64],\"convert\":[64],\"format\":[64],\"openHelloDialog\":[64]},[[9,\"resize\",\"handleResize\"]],{\"appearanceSettingsOverride\":[\"handleAppearanceSettingsOverrideChange\"]}]]],[\"zonos-controller.cjs\",[[1,\"zonos-controller\",{\"config\":[16],\"zonosApiKey\":[1,\"zonos-api-key\"],\"initCheckoutElement\":[64],\"setupGoogleFont\":[64],\"showNotification\":[64],\"reset\":[64],\"overrideConfig\":[64],\"overrideCountry\":[64],\"getAppearanceSetting\":[64],\"updateOrganizationName\":[64]},[[8,\"locationchange\",\"handleLocationChange\"]]]]],[\"zonos-tooltip.cjs\",[[1,\"zonos-tooltip\",{\"label\":[1],\"subtitle\":[1],\"showTooltip\":[32]}]]],[\"zonos-component.cjs\",[[1,\"zonos-component\",{\"first\":[1],\"middle\":[1],\"last\":[1]}]]],[\"zonos-link.cjs\",[[1,\"zonos-link\",{\"href\":[1],\"rel\":[1],\"target\":[1],\"linkTitle\":[1,\"link-title\"]}]]],[\"zonos-logo.cjs\",[[1,\"zonos-logo\",{\"theme\":[1],\"width\":[1]}]]],[\"zonos-hello-dialog.cjs\",[[1,\"zonos-hello-dialog\",{\"isOpen\":[4,\"is-open\"],\"setIsOpen\":[16],\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettings\":[16],\"restrictedItems\":[16],\"welcomeMessage\":[32],\"showCountrySelect\":[32],\"showLanguageSelect\":[32]},[[4,\"click\",\"globalClickHandler\"]],{\"isOpen\":[\"isOpenHandler\"]}]]],[\"zonos-badge.cjs\",[[1,\"zonos-badge\",{\"bold\":[4],\"badgeColor\":[1,\"badge-color\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"rounded\":[4],\"loading\":[4],\"dismissHandler\":[16]}]]],[\"zonos-shipping-rich-radio.cjs\",[[1,\"zonos-shipping-rich-radio\",{\"items\":[16],\"borderColor\":[1,\"border-color\"],\"borderStyle\":[1,\"border-style\"],\"theme\":[1],\"selectedItem\":[16]}]]],[\"zonos-toggle.cjs\",[[1,\"zonos-toggle\",{\"options\":[16],\"value\":[1]}]]],[\"zonos-collapse.cjs\",[[1,\"zonos-collapse\",{\"collapsed\":[4],\"collapseSize\":[2,\"collapse-size\"],\"height\":[32],\"iframe\":[32]}]]],[\"zonos-stripe-input.cjs\",[[1,\"zonos-stripe-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"overridePrimaryColor\":[1,\"override-primary-color\"],\"overrideSecondaryColor\":[1,\"override-secondary-color\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[1025],\"internalValue\":[32]},null,{\"inputValue\":[\"onInputValueChange\"],\"value\":[\"onValueChange\"]}]]],[\"zonos-card.cjs\",[[1,\"zonos-card\",{\"actions\":[16],\"backgroundColor\":[1,\"background-color\"],\"borderRadius\":[2,\"border-radius\"],\"footerActions\":[16],\"footerContent\":[16],\"footerHeight\":[2,\"footer-height\"],\"label\":[16],\"spacing\":[1]}]]],[\"zonos-input.cjs\",[[1,\"zonos-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"inputSize\":[1,\"input-size\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[32]},null,{\"inputValue\":[\"onInputValueChange\"]}]]],[\"zonos-text.cjs\",[[1,\"zonos-text\",{\"textColor\":[1,\"text-color\"],\"size\":[1],\"type\":[1],\"weight\":[2],\"ready\":[32]}]]],[\"zonos-banner.cjs\",[[1,\"zonos-banner\",{\"bannerTitle\":[1,\"banner-title\"],\"intent\":[1],\"hasContent\":[32]}]]],[\"zonos-country-flag.cjs\",[[1,\"zonos-country-flag\",{\"countryCode\":[1,\"country-code\"],\"size\":[2]}]]],[\"zonos-v-stack.cjs\",[[1,\"zonos-v-stack\",{\"spacing\":[2]}]]],[\"zonos-empty-state-payment_4.cjs\",[[1,\"zonos-empty-state-payment\",{\"emptyStateText\":[1,\"empty-state-text\"],\"theme\":[1]}],[2,\"zonos-payment\",{\"titleText\":[1,\"title-text\"],\"stripe\":[32],\"stripeElements\":[32],\"isPaymentInfoFilled\":[32]},null,{\"isPaymentInfoFilled\":[\"watchIsPaymentInfoFilled\"],\"stripeElements\":[\"watchInitStripe\"],\"stripe\":[\"watchInitStripe\"]}],[2,\"zonos-paypal-payment\"],[1,\"zonos-notification\",{\"notificationArray\":[32],\"showNotification\":[64]}]]],[\"zonos-button_3.cjs\",[[17,\"zonos-button\",{\"buttonColor\":[1,\"button-color\"],\"backgroundColor\":[1,\"background-color\"],\"borderStyle\":[1,\"border-style\"],\"isDisabled\":[4,\"is-disabled\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"variant\":[1],\"noBackground\":[4,\"no-background\"],\"withBoxShadow\":[4,\"with-box-shadow\"],\"noPaddingLeft\":[4,\"no-padding-left\"],\"noPaddingRight\":[4,\"no-padding-right\"],\"loading\":[4],\"justifyContent\":[1,\"justify-content\"],\"bold\":[4],\"theme\":[1],\"hasIcon\":[32],\"hasContent\":[32]},[[2,\"click\",\"clickHandler\"]],{\"icon\":[\"iconChangeHandler\"]}],[1,\"zonos-spinner\",{\"size\":[2],\"spinnerColor\":[1,\"spinner-color\"]}],[1,\"zonos-icon\",{\"autoHeight\":[4,\"auto-height\"],\"iconColor\":[1,\"icon-color\"],\"content\":[1],\"size\":[2]}]]],[\"zonos-language-select_2.cjs\",[[1,\"zonos-language-select\",{\"handleOnClose\":[16]}],[1,\"zonos-select-dialog-header\",{\"handleOnClose\":[16],\"label\":[1]}]]],[\"zonos-country-select_4.cjs\",[[1,\"zonos-country-select\",{\"handleOnClose\":[16],\"inputValue\":[32]}],[1,\"zonos-hello-dialog-footer\",{\"appearanceSettings\":[16],\"setShowCountrySelect\":[16],\"setShowLanguageSelect\":[16]}],[1,\"zonos-custom-message\",{\"icon\":[1],\"message\":[1]}],[2,\"zonos-virtual-scroll\",{\"renderItem\":[16],\"itemWidth\":[2,\"item-width\"],\"fallbackItemHeight\":[2,\"fallback-item-height\"],\"itemHeights\":[16],\"container\":[32],\"scrollTop\":[32],\"totalHeight\":[32]},null,{\"itemHeights\":[\"updateTotalHeight\"],\"fallbackItemHeight\":[\"updateTotalHeight\"]}]]],[\"zonos-address_7.cjs\",[[1,\"zonos-address-update-dialog\",{\"continueLoading\":[4,\"continue-loading\"],\"dialogLoading\":[4,\"dialog-loading\"],\"dialogOpen\":[4,\"dialog-open\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"shippingAddress\":[16],\"billingAddress\":[16],\"translatedShippingAddress\":[16],\"translatedBillingAddress\":[16],\"showErrorBanner\":[32],\"translatedShippingAddressState\":[32],\"translatedBillingAddressState\":[32]},null,{\"translatedShippingAddress\":[\"watchTranslatedShippingAddress\"],\"translatedBillingAddress\":[\"watchTranslatedBillingAddress\"]}],[2,\"zonos-address\",{\"type\":[1],\"titleText\":[1,\"title-text\"],\"defaultAddress\":[16],\"stripe\":[32],\"isDirtyAddress\":[32]},null,{\"stripe\":[\"watchInitStripe\"],\"defaultAddress\":[\"defaultAddressChanged\"]}],[2,\"zonos-link-authentication\",{\"titleText\":[1,\"title-text\"],\"defaultEmail\":[1,\"default-email\"],\"isEmailError\":[4,\"is-email-error\"],\"stripe\":[32],\"isStagingMode\":[32],\"clientSecret\":[32]},null,{\"isStagingMode\":[\"watchIsStagingMode\"],\"stripe\":[\"watchInitStripe\"],\"clientSecret\":[\"watchInitStripe\"],\"defaultEmail\":[\"watchDefaultEmail\"]}],[1,\"zonos-checkbox\",{\"backgroundColor\":[1,\"background-color\"],\"label\":[1],\"isChecked\":[4,\"is-checked\"],\"isDisabled\":[4,\"is-disabled\"],\"size\":[2],\"fontSize\":[1,\"font-size\"],\"borderStyle\":[1,\"border-style\"]},[[1,\"click\",\"onClick\"]]],[1,\"zonos-dialog\",{\"open\":[4],\"headerText\":[1,\"header-text\"],\"width\":[1],\"height\":[1],\"minHeight\":[1,\"min-height\"],\"noHeader\":[4,\"no-header\"],\"noBodyPadding\":[4,\"no-body-padding\"],\"noBorder\":[4,\"no-border\"],\"borderStyle\":[1,\"border-style\"],\"noCloseButton\":[4,\"no-close-button\"],\"noClickOutside\":[4,\"no-click-outside\"],\"mobile\":[4],\"isLoading\":[4,\"is-loading\"],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"],[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-address-display\",{\"currentAddress\":[16],\"addressType\":[1,\"address-type\"]}],[1,\"zonos-address-form\",{\"currentAddress\":[16],\"translatedAddress\":[16],\"addressType\":[1,\"address-type\"],\"localAddress\":[32]},null,{\"translatedAddress\":[\"watchCurrentAddress\"]}]]],[\"zonos-cart-items_13.cjs\",[[2,\"zonos-customer-info\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"defaultAddress\":[16],\"showErrorBanner\":[32],\"shippingCountry\":[32],\"isCheckingForRestrictedItems\":[32],\"isValidatingAddress\":[32],\"isTaxIdError\":[32],\"invalidShippingCharacterList\":[32],\"invalidBillingCharacterList\":[32],\"openAddressValidationDialog\":[32],\"isEmailError\":[32]}],[2,\"zonos-checkout-payment\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"overridePrimaryColor\":[1,\"override-primary-color\"],\"showErrorBanner\":[32],\"hasStripePaymentError\":[32],\"stagingOrderCreateErrorMessage\":[32],\"internalContinueLoading\":[32]},null,{\"continueLoading\":[\"continueLoadingWatcher\"],\"hasStripePaymentError\":[\"stripePaymentErrorWatcher\"]}],[1,\"zonos-checkout-footer\",{\"mobile\":[4],\"dataTheme\":[1,\"data-theme\"],\"showLanguageDialog\":[32],\"isMobile\":[32]},[[4,\"click\",\"handleGlobalClick\"]],{\"mobile\":[\"handleMobileChange\"]}],[2,\"zonos-shipping\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"selectedShippingMethod\":[32],\"collapsedDAPOptions\":[32],\"isSelecting\":[32],\"showErrorBanner\":[32],\"serviceLevelsDDP\":[32],\"serviceLevelsDAP\":[32],\"serviceLevelsOther\":[32],\"serviceLevelsAll\":[32],\"displayBaseCurrency\":[32]}],[1,\"zonos-cart-subtotal\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"loading\":[32]}],[1,\"zonos-cart-restricted-items\",{\"hide\":[4],\"errorImages\":[32],\"internalCollapsed\":[32],\"firstRender\":[32]}],[1,\"zonos-checkout-finish\",{\"borderRadius\":[1,\"border-radius\"],\"storybookForceStatus\":[1,\"storybook-force-status\"],\"overrideNotification\":[16],\"isLoading\":[32],\"notificationType\":[32],\"notificationTitle\":[32],\"notificationMessages\":[32],\"notificationActionText\":[32],\"order\":[32],\"isWaitingToRedirect\":[32]}],[1,\"zonos-confirm-dialog\",{\"dialogTitle\":[1,\"dialog-title\"],\"dialogIntent\":[1,\"dialog-intent\"],\"dialogSubtitle\":[1,\"dialog-subtitle\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"dialogConfirmBtnText\":[1,\"dialog-confirm-btn-text\"],\"dialogWidth\":[2,\"dialog-width\"],\"dialogCancelBtnText\":[1,\"dialog-cancel-btn-text\"],\"dialogType\":[1,\"dialog-type\"],\"isMobile\":[4,\"is-mobile\"],\"dialogOpen\":[4,\"dialog-open\"],\"noClickOutside\":[4,\"no-click-outside\"]},[[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-checkout-progress-tabs\",{\"tabColor\":[1,\"tab-color\"],\"backgroundColor\":[1,\"background-color\"],\"setTabItems\":[64],\"setTabSelected\":[64]}],[1,\"zonos-review\",{\"mobile\":[4],\"collapsed\":[4],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"]]],[1,\"zonos-cart-items\",{\"errorImages\":[32]}],[1,\"zonos-currency-toggle\",{\"errorImages\":[32]}],[1,\"zonos-rest-state\",{\"restStateSubtitle\":[1,\"rest-state-subtitle\"],\"restStateTitle\":[1,\"rest-state-title\"],\"restStateType\":[1,\"rest-state-type\"],\"isErrorImageLoad\":[32]}]]]]"), options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
4
|
-
const cart = require('./cart-
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
4
|
+
const cart = require('./cart-93ed3002.js');
|
|
5
|
+
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
6
6
|
const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
|
|
7
7
|
|
|
8
8
|
/*!
|
|
@@ -311,6 +311,10 @@ const paypalButtonOptions = ({ checkoutSessionId, onPaypalFail, onPaypalSessionD
|
|
|
311
311
|
});
|
|
312
312
|
return {
|
|
313
313
|
createOrder: async () => {
|
|
314
|
+
// Clicking on the paypal button should trigger the paymentInfoCompleted event
|
|
315
|
+
void cart.trackConversionEvent('checkout_paymentInfoCompleted', {
|
|
316
|
+
paymentMethod: 'paypal',
|
|
317
|
+
});
|
|
314
318
|
const checkoutSessionStatus = await cart.validateCheckoutSession();
|
|
315
319
|
if (!checkoutSessionStatus.valid) {
|
|
316
320
|
paypalStore.paypalErrorMessage = checkoutSessionStatus.errorMessage;
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-93ed3002.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
8
|
-
const
|
|
9
|
-
const handleFetch = require('./handleFetch-ff25db40.js');
|
|
8
|
+
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
10
9
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
11
10
|
const classes = require('./classes-b7918f56.js');
|
|
12
11
|
const RemoveIcon$1 = require('./RemoveIcon-081ac073.js');
|
|
@@ -24,6 +23,10 @@ const ZonosAddress = class {
|
|
|
24
23
|
* Google autocomplete overlay is conflict with our button, this is to adjust z index of the autocomplete
|
|
25
24
|
*/
|
|
26
25
|
this.isAutoCompleteAdjusted = false;
|
|
26
|
+
/**
|
|
27
|
+
* Check if the tracking event is sent
|
|
28
|
+
*/
|
|
29
|
+
this.trackingSent = false;
|
|
27
30
|
this.type = undefined;
|
|
28
31
|
this.titleText = undefined;
|
|
29
32
|
this.defaultAddress = [];
|
|
@@ -49,9 +52,14 @@ const ZonosAddress = class {
|
|
|
49
52
|
case 'billing':
|
|
50
53
|
cart.stripeStore.stripeBillingAddressEventData = event;
|
|
51
54
|
break;
|
|
52
|
-
default:
|
|
55
|
+
default: {
|
|
56
|
+
if (event.complete && !this.trackingSent) {
|
|
57
|
+
void cart.trackConversionEvent('checkout_customerInfoFilled');
|
|
58
|
+
this.trackingSent = true;
|
|
59
|
+
}
|
|
53
60
|
cart.stripeStore.stripeAddressEventData = event;
|
|
54
61
|
break;
|
|
62
|
+
}
|
|
55
63
|
}
|
|
56
64
|
}
|
|
57
65
|
updateAddressElement({ stripeAddressElement, type, }) {
|
|
@@ -121,7 +129,7 @@ const ZonosAddress = class {
|
|
|
121
129
|
this.isAutoCompleteAdjusted = true;
|
|
122
130
|
}
|
|
123
131
|
// scroll directly into view if it's mobile
|
|
124
|
-
if (
|
|
132
|
+
if (handleFetch.isCheckoutMobile()) {
|
|
125
133
|
this.el.scrollIntoView({ behavior: 'smooth', block: 'end' });
|
|
126
134
|
}
|
|
127
135
|
else {
|
|
@@ -197,7 +205,7 @@ const ZonosAddress = class {
|
|
|
197
205
|
}
|
|
198
206
|
render() {
|
|
199
207
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
200
|
-
return (index.h(index.Host, { key: '
|
|
208
|
+
return (index.h(index.Host, { key: '9fd8e0ac4b86c10004c24e9d33f40ec577bd2a73', class: "zonos--address zonos--elements" }, index.h("zonos-text", { key: 'e7c3cbcab6f175354f26a8426d0dbf01afca736d', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), index.h("div", { key: '48ccbb019255c5362adf4c7954a7c2e3b015bfa5', class: "zonos--address-component" })));
|
|
201
209
|
}
|
|
202
210
|
get el() { return index.getElement(this); }
|
|
203
211
|
static get watchers() { return {
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-93ed3002.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const paypal = require('./paypal-
|
|
8
|
+
const paypal = require('./paypal-8b49ef07.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
10
|
-
const handleFetch = require('./handleFetch-
|
|
10
|
+
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
11
11
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
12
12
|
const getBorderRadius = require('./getBorderRadius-94ef609c.js');
|
|
13
|
-
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
14
13
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
15
14
|
const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
|
|
16
15
|
const isColorVariable = require('./isColorVariable-525dbfa7.js');
|
|
@@ -1487,9 +1486,10 @@ const ZonosCheckoutFinish = class {
|
|
|
1487
1486
|
clientSecret,
|
|
1488
1487
|
storybookForceStatus: this.storybookForceStatus,
|
|
1489
1488
|
});
|
|
1490
|
-
|
|
1489
|
+
const isError = status === 'requires_action' || error;
|
|
1490
|
+
this.notificationType = isError ? 'error' : 'success';
|
|
1491
1491
|
this.notificationMessages = messages || [];
|
|
1492
|
-
this.notificationTitle =
|
|
1492
|
+
this.notificationTitle = isError
|
|
1493
1493
|
? cart.translate('Payment failed')
|
|
1494
1494
|
: cart.translate("You're all set!");
|
|
1495
1495
|
handleFetch.log('=== Payment intent retrieve status', 'info', {
|
|
@@ -1566,6 +1566,9 @@ const ZonosCheckoutFinish = class {
|
|
|
1566
1566
|
// show success message right away when order id is already created
|
|
1567
1567
|
this.isLoading = false;
|
|
1568
1568
|
if (paypal.paypalStore.orderIdCreated) {
|
|
1569
|
+
paypal.submitGtag('zonos-checkout-success');
|
|
1570
|
+
// Make sure to send the event when order is completed
|
|
1571
|
+
await cart.trackConversionEvent('checkout_orderCompleted');
|
|
1569
1572
|
this.notificationType = 'success';
|
|
1570
1573
|
this.notificationTitle = cart.translate("You're all set!");
|
|
1571
1574
|
this.notificationMessages =
|
|
@@ -1632,11 +1635,11 @@ const ZonosCheckoutFinish = class {
|
|
|
1632
1635
|
}
|
|
1633
1636
|
render() {
|
|
1634
1637
|
const isTestMode = handleFetch.getIsTestMode();
|
|
1635
|
-
return (index.h(index.Host, { key: '
|
|
1638
|
+
return (index.h(index.Host, { key: '4bb26161ad400a7bbd7b7e9f0568ac5de8f18004', class: "zonos--checkout-finish zonos--elements", style: {
|
|
1636
1639
|
'--zonos--border-radius': getBorderRadius.getBorderRadius({
|
|
1637
1640
|
overrideBorderStyle: this.borderRadius,
|
|
1638
1641
|
}),
|
|
1639
|
-
} }, !this.isLoading && (index.h("div", { key: '
|
|
1642
|
+
} }, !this.isLoading && (index.h("div", { key: '85d3bf11c73dfd2b18d0a6d996f2c1f4a01a2288', class: "zonos--finish-details" }, index.h("div", { key: '0e4fb2b7cd03a4464dde3cce69932b8482da0d02', class: "zonos--group" }, this.notificationType === 'success' ? (index.h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (index.h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), index.h("zonos-text", { key: '0ced9d9d83576979ae785be52c0ae07dca0fd5de', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", { key: 'd14a6fbe02dc836512b41859cc8de573653c4884', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (index.h("zonos-button", { key: '5a80853fd1374fc72ccc2b416b62f6c52e4916dd',
|
|
1640
1643
|
// Only show loading spinner if it's not an error notification
|
|
1641
1644
|
loading: this.isWaitingToRedirect &&
|
|
1642
1645
|
this.notificationType !== 'error', onClick: () => {
|
|
@@ -1648,9 +1651,9 @@ const ZonosCheckoutFinish = class {
|
|
|
1648
1651
|
}
|
|
1649
1652
|
this.closeClickHandler();
|
|
1650
1653
|
}, size: "md", variant: "primary" }, cart.translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
1651
|
-
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '
|
|
1654
|
+
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: 'ba2fca63de8f04c76fa4d1bc96d06863fbad78cf', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
1652
1655
|
cart.cartStore.step === 'finish' &&
|
|
1653
|
-
this.notificationType === 'success' && (index.h("div", { key: '
|
|
1656
|
+
this.notificationType === 'success' && (index.h("div", { key: '1e3cb2f2f5874b93886247af585566dbaad9a45f', class: "zonos--finish-button-wrapper" }, index.h("zonos-button", { key: 'f8603ae4e116da9f8adabe648a6f626b994f208a', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), index.h("zonos-button", { key: '91df622529ff650464b3694780e65d2d929548f9', onClick: () => {
|
|
1654
1657
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
1655
1658
|
this.redirectToUrl(isZonosDashboard
|
|
1656
1659
|
? '/orders/all'
|
|
@@ -1693,10 +1696,10 @@ const ZonosCheckoutFooter = class {
|
|
|
1693
1696
|
this.showLanguageDialog = !this.showLanguageDialog;
|
|
1694
1697
|
}
|
|
1695
1698
|
handleMobileChange() {
|
|
1696
|
-
this.isMobile =
|
|
1699
|
+
this.isMobile = handleFetch.isCheckoutMobile(this.mobile);
|
|
1697
1700
|
}
|
|
1698
1701
|
componentWillLoad() {
|
|
1699
|
-
this.isMobile =
|
|
1702
|
+
this.isMobile = handleFetch.isCheckoutMobile(this.mobile);
|
|
1700
1703
|
}
|
|
1701
1704
|
render() {
|
|
1702
1705
|
var _a;
|
|
@@ -2488,10 +2491,10 @@ const ZonosReview = class {
|
|
|
2488
2491
|
this.isMobile = false;
|
|
2489
2492
|
}
|
|
2490
2493
|
handleWindowResize() {
|
|
2491
|
-
this.isMobile =
|
|
2494
|
+
this.isMobile = handleFetch.isCheckoutMobile(this.mobile);
|
|
2492
2495
|
}
|
|
2493
2496
|
componentWillLoad() {
|
|
2494
|
-
this.isMobile =
|
|
2497
|
+
this.isMobile = handleFetch.isCheckoutMobile(this.mobile);
|
|
2495
2498
|
}
|
|
2496
2499
|
render() {
|
|
2497
2500
|
const total = cart.cartStoreHasOneEligibleItem() ? cart.cartStore.total : 0;
|
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-93ed3002.js');
|
|
7
|
+
const paypal = require('./paypal-8b49ef07.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
10
|
-
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
9
|
+
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
11
10
|
const classes = require('./classes-b7918f56.js');
|
|
12
11
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
13
12
|
const getBorderRadius = require('./getBorderRadius-94ef609c.js');
|
|
14
13
|
const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
|
|
15
14
|
const styles = require('./styles-d1e64fb9.js');
|
|
16
|
-
const CheckoutConfig = require('./CheckoutConfig-
|
|
15
|
+
const CheckoutConfig = require('./CheckoutConfig-fb59baa3.js');
|
|
17
16
|
const RemoveIcon = require('./RemoveIcon-081ac073.js');
|
|
18
17
|
|
|
19
18
|
/**
|
|
@@ -194,17 +193,20 @@ const sendBulkLoadTimeApiLog = async () => {
|
|
|
194
193
|
loadTimeApiInfoList: window.Zonos.loadTimeApiInfoList,
|
|
195
194
|
});
|
|
196
195
|
// Clone the list so we can clear it after sending the log
|
|
197
|
-
const loadTimeApiInfoListArray =
|
|
196
|
+
const loadTimeApiInfoListArray = {
|
|
197
|
+
data: [...window.Zonos.loadTimeApiInfoList],
|
|
198
|
+
storeId: window.Zonos.storeId || 0,
|
|
199
|
+
};
|
|
198
200
|
// Clear the list after sending the log successfully
|
|
199
201
|
window.Zonos.loadTimeApiInfoList.length = 0;
|
|
200
202
|
// Clear the list after sending the log successfully
|
|
201
|
-
const { errors } = await handleFetch.handleFetch('/api/zonos-elements/log-bulk-load', {
|
|
203
|
+
const { errors } = await handleFetch.handleFetch('/api/zonos-elements/log-bulk-load-data', {
|
|
202
204
|
body: loadTimeApiInfoListArray,
|
|
203
205
|
method: 'POST',
|
|
204
206
|
});
|
|
205
207
|
if (errors.length) {
|
|
206
208
|
// If there are errors, add the logs back to the list so we can try again later
|
|
207
|
-
window.Zonos.loadTimeApiInfoList.push(...loadTimeApiInfoListArray);
|
|
209
|
+
window.Zonos.loadTimeApiInfoList.push(...loadTimeApiInfoListArray.data);
|
|
208
210
|
numberOfFailures++;
|
|
209
211
|
if (numberOfFailures > 5 && window.Zonos.logIntervalId) {
|
|
210
212
|
// If there are more than 3 failures, stop the interval
|
|
@@ -716,11 +718,11 @@ const ZonosCheckout = class {
|
|
|
716
718
|
isPreview: this.preview,
|
|
717
719
|
sessionTimeout: CHECKOUT_SESSION_TIMEOUT,
|
|
718
720
|
});
|
|
721
|
+
paypal.submitGtag('zonos-checkout-start');
|
|
722
|
+
void cart.trackConversionEvent('checkout_open');
|
|
719
723
|
const { enabled } = await isStoreDiscountEnabled();
|
|
720
724
|
// Hide discount input if there's no active discount configured for the store
|
|
721
725
|
cart.cartStore.shouldHideDiscountInput = !enabled;
|
|
722
|
-
paypal.submitGtag('zonos-checkout-start');
|
|
723
|
-
void cart.trackConversionEvent('checkout_open');
|
|
724
726
|
this.handleOrderDuplication();
|
|
725
727
|
if (window.Zonos.isLegacyCheckout) {
|
|
726
728
|
void sendLoadCheckoutFacadeLog();
|
|
@@ -1157,13 +1159,13 @@ const ZonosCheckout = class {
|
|
|
1157
1159
|
}
|
|
1158
1160
|
}
|
|
1159
1161
|
handleWindowResize() {
|
|
1160
|
-
this.isMobile =
|
|
1162
|
+
this.isMobile = handleFetch.isCheckoutMobile(this.mobile);
|
|
1161
1163
|
// apply theme to stripe elements
|
|
1162
1164
|
void this.applyStripeTheme();
|
|
1163
1165
|
handleFetch.log(`mobile: ${this.isMobile}`);
|
|
1164
1166
|
}
|
|
1165
1167
|
handleMobileChange() {
|
|
1166
|
-
this.isMobile =
|
|
1168
|
+
this.isMobile = handleFetch.isCheckoutMobile(this.mobile);
|
|
1167
1169
|
// apply theme to stripe elements
|
|
1168
1170
|
void this.applyStripeTheme();
|
|
1169
1171
|
handleFetch.log(`mobile: ${this.isMobile}`);
|
|
@@ -1258,7 +1260,7 @@ const ZonosCheckout = class {
|
|
|
1258
1260
|
}
|
|
1259
1261
|
componentWillLoad() {
|
|
1260
1262
|
void this.init();
|
|
1261
|
-
this.isMobile =
|
|
1263
|
+
this.isMobile = handleFetch.isCheckoutMobile(this.mobile);
|
|
1262
1264
|
this.isIframed = window.self !== window.top;
|
|
1263
1265
|
handleFetch.log(`iframed: ${this.isIframed}`);
|
|
1264
1266
|
// update theme to browser preference theme if appearance theme is system
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-93ed3002.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
8
|
-
const handleFetch = require('./handleFetch-
|
|
8
|
+
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
9
9
|
require('./isDarkColor-ec4a4e7d.js');
|
|
10
10
|
require('./getBorderRadius-94ef609c.js');
|
|
11
11
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-93ed3002.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-969d05d8.js');
|
|
10
10
|
require('./isDarkColor-ec4a4e7d.js');
|
|
11
11
|
require('./getBorderRadius-94ef609c.js');
|
|
12
12
|
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-93ed3002.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
|
|
10
10
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
11
|
-
require('./handleFetch-
|
|
11
|
+
require('./handleFetch-969d05d8.js');
|
|
12
12
|
require('./getBorderRadius-94ef609c.js');
|
|
13
13
|
|
|
14
14
|
/**
|